<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.w3.org/1999/xhtml">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>websocket</title>
  <link rel="stylesheet" type="text/css" href="/static/css/websoket.css" th:href="@{/css/websoket.css}">
</head>
<!-- 禁止页面内浏览器右键菜单出现 oncontextmenu="event.returnValue=false;"-->
<body id="container">
  <div id="toolbar">工具栏</div>
  <div id="content">
    <img id="image-element-id" src="" alt="远程桌面" />
  </div>
  <!-- 自定义菜单 -->
  <div id="custom-menu">
    <ul>
      <li onclick="openWebSocket()">连接</li>
      <li onclick="closeWebSocket()">关闭</li>
      <li onclick="hideMenu()">关闭菜单</li>
    </ul>
  </div>
</body>
<script th:inline="javascript">
  var websocketUrl = "ws://" + /*[[ ${ip} + ':' + ${port} + ${websocketPath} ]]*/;
</script>
<script type="text/javascript" src="/static/js/websocket.js" th:src="@{/js/websocket.js}"></script>
</html>